<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>

<body>
    <script src="../框架相关的js/vue.js"></script>
    <div id="app">
        <select v-model="selected">
            <option disabled value="" checked>请选择</option>
            <!-- <option value="A">A</option>
            <option value="B">B</option>
            <option value="C">C</option> -->
            <option v-for="item in list" :value="item.value">{{item.txt}}</option>
          </select>
          <span>Selected: {{ selected }}</span>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                selected:'',
                list:null

           },
           methods: {
               //模拟调取接口获取数据
               getlist(){
                   var arr=[{txt:'篮球',value:'basketball'},{txt:'足球',value:'soccer'},{txt:'排球',value:'volleyball'}]
                        this.list=arr
               }
           },
           watch:{
             'selected'(a,b){
                    console.log(a);
             }
           },
           mounted() {
               this.getlist()
           },

        })
    </script>
</body>

</html>